Skip to content

Commit

Permalink
cleaning up errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thatstoasty committed Apr 24, 2024
1 parent 68d0fab commit 4ca8298
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gojo/net/socket.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ struct Socket(FileDescriptorBase):
src: The data to send.
max_attempts: The maximum number of attempts to send the data.
"""
var header_pointer = Pointer[Int8](src.data.value).bitcast[UInt8]()
var header_pointer = Pointer[Int8](src.data.address).bitcast[UInt8]()
var total_bytes_sent = 0
var attempts = 0

Expand Down Expand Up @@ -377,7 +377,7 @@ struct Socket(FileDescriptorBase):
address: The IP address to connect to.
port: The port number to connect to.
"""
var header_pointer = Pointer[Int8](src.data.value).bitcast[UInt8]()
var header_pointer = Pointer[Int8](src.data.address).bitcast[UInt8]()
self.connect(address, port)
var bytes_written: Int
var err: Error
Expand Down

0 comments on commit 4ca8298

Please sign in to comment.