Skip to content

Commit

Permalink
Merge pull request #27 from mc-17/feature/update
Browse files Browse the repository at this point in the history
Catch payload send exceptions
  • Loading branch information
mc-17 committed Jul 28, 2022
2 parents c245922 + 32148d2 commit ec74908
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ def send(ip, port, file):
client_socket.sendfile(fp)
print(f"Sending payload: attempt {i} succeeded!")
break
except Exception as e:
print(f"Attempt {i} failed with exception: {str(e)}")
pass
finally:
client_socket.close()

0 comments on commit ec74908

Please sign in to comment.