Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2nd iteration Fixes #5

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

2nd iteration Fixes #5

wants to merge 3 commits into from

Conversation

PavelLinearB
Copy link
Member

@PavelLinearB PavelLinearB commented Feb 19, 2025

✨ PR Description

Purpose: Implements a basic client-server chat application using TCP sockets and threading in Python.

Main changes:

  • Created client module with socket connection and message handling functionality
  • Developed server module with multi-client support using threaded connections
  • Implemented data streaming with chunked message handling for larger messages

This description was generated by LinearB AI and Added by gitStream

@PavelLinearB PavelLinearB changed the title Fixes 2nd iteration Fixes Feb 19, 2025
Copy link

gitstream-cm bot commented Feb 19, 2025

✨ PR Review Suggestion

Bug - src/server/server.py (Line 70)

Details:

Problem: Thread creation has incorrect args format - should be tuple
Fix: Add comma to make single argument a tuple
Why: Without comma, args expects a sequence but gets a single value, causing TypeError

-    newConnectionsThread = threading.Thread(target = newConnections, args = (sock))
+    newConnectionsThread = threading.Thread(target = newConnections, args = (sock,))

Security - src/client/client.py (Line 18)

Details:

Problem: Bare except clause catches all exceptions including KeyboardInterrupt
Fix: Specify socket.error exception type
Why: Catching specific exceptions improves error handling and allows clean program termination

-        except:
+        except socket.error:

Security - src/server/server.py (Line 34)

Details:

Problem: Bare except clause catches all exceptions including KeyboardInterrupt
Fix: Specify socket.error exception type
Why: Catching specific exceptions improves error handling and allows clean program termination

-            except:
+            except socket.error:

This review was generated by LinearB AI and Added by gitStream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant