diff --git a/streams.go b/streams.go index 8f9325c..dc0e00f 100644 --- a/streams.go +++ b/streams.go @@ -5,7 +5,6 @@ package runtime import ( "context" "errors" - "time" "github.com/TeoSlayer/pilotprotocol/pkg/coreapi" "github.com/TeoSlayer/pilotprotocol/pkg/daemon" @@ -78,9 +77,7 @@ func (s *streamAdapter) LocalPort() uint16 { return s.conn.LocalPort } func (s *streamAdapter) RemoteAddr() coreapi.Addr { return s.conn.RemoteAddr } func (s *streamAdapter) RemotePort() uint16 { return s.conn.RemotePort } -func (s *streamAdapter) SetDeadline(time.Time) error { return nil } -func (s *streamAdapter) SetReadDeadline(time.Time) error { return nil } -func (s *streamAdapter) SetWriteDeadline(time.Time) error { return nil } + var ( _ coreapi.Streams = daemonStreams{} diff --git a/zz_streams_ceiling_test.go b/zz_streams_ceiling_test.go index 48eaaec..6ab6e58 100644 --- a/zz_streams_ceiling_test.go +++ b/zz_streams_ceiling_test.go @@ -9,7 +9,6 @@ import ( "net" "strings" "testing" - "time" "github.com/TeoSlayer/pilotprotocol/pkg/coreapi" "github.com/TeoSlayer/pilotprotocol/pkg/daemon" @@ -155,16 +154,9 @@ func TestDaemonListener_AcceptDeliversStreamWithAccessors(t *testing.T) { t.Errorf("RemotePort = %d, want 8888", got) } - // The deadline shims are documented no-ops returning nil. - if err := stream.SetDeadline(time.Now().Add(time.Hour)); err != nil { - t.Errorf("SetDeadline: %v", err) - } - if err := stream.SetReadDeadline(time.Now().Add(time.Hour)); err != nil { - t.Errorf("SetReadDeadline: %v", err) - } - if err := stream.SetWriteDeadline(time.Now().Add(time.Hour)); err != nil { - t.Errorf("SetWriteDeadline: %v", err) - } + // Deadline methods were removed from coreapi.Stream (PILOT-79). + // The runtime cannot honor them; removing from the interface + // gives callers a compile-time signal instead of a silent no-op. // Closing the stream goes through daemon.CloseConnection, which for // a synthetic conn in StateClosed exits via the non-ESTABLISHED