Skip to content

Commit

Permalink
Merge pull request #101 from karelvanhecke/wrap-socket-conditionally
Browse files Browse the repository at this point in the history
fix: only call wrap_socket when TLS is enabled
  • Loading branch information
tasleson authored Mar 1, 2024
2 parents b588b2b + 95dd446 commit 78a7e2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion targetd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@ def main():
note = "(TLS no)"

server = server_class(("", 18700), TargetHandler)
server.socket = wrap_socket(server.socket)

if config["ssl"]:
server.socket = wrap_socket(server.socket)

log.info("started server %s", note)

server.timeout = 0.5
Expand Down

0 comments on commit 78a7e2b

Please sign in to comment.